1. Field of the Invention
The present invention relates to a method and an apparatus for measuring sizes of objects by using a camera or a CCTV camera, and more particularly, to a method and an apparatus for precisely and quickly measuring heights and widths of a plurality of objects by using a photograph taken by using a single camera.
2. Description of the Related Art
The basic method of measuring height and width of an object is directly measuring the height and the width of the object by using a ruled scale to the object. Height and width of an object may also be indirectly measured by multiplying a distance and an angle by a magnification ratio. In this case, if the distance to the object is sufficiently larger than size of the object, error due to angle is very subtle.
Furthermore, size of an object may be measured by taking a photograph of the object and measuring size in the photograph.
FIG. 1 is a diagram showing that length of an object is measured by using a photograph of the object. Here, to find out actual size of an object, it is necessary to know a reduction ratio or a magnification ratio of the photograph. In a case of a map or an aerial photograph as shown in FIG. 1(A), if a reduction ratio 100 is known, size of an object may be induced by multiplying a distance in a photograph by the reduction ratio 100. For another example, in a case of an electron microscopic photograph or a microscopic photograph as shown in FIG. 1(B), size of an object may be induced by marking a reference length 110 in a portion of a photograph, measuring size of an object by using a scale, and comparing the measured size to the reference length. In the same regard, an object in a general photograph may be measured.
FIG. 2 is a diagram showing a reference scale for measuring a length next to an object.
As shown in FIG. 2, size of an object 210 may be measured by arranging a reference scale 200 with a known size next to the object 210 to be measured, photographing the reference scale 200 and the object 210 together, and measuring size of the object 210 by measuring size of the object 210 in a photograph by using a ruled scale and comparing the measured size of the object 210 in the photograph to that of the reference scale 200. The method is effective in a case where it is difficult to use a ruled scale or it is easy to photograph an object. Using a fixed camera or a CCTV camera which may adjust its angle and magnification ratio, sizes of a plurality of objects distributed throughout a wide area may be precisely measured by using a single camera. In other words, objects to be measured may be photographed at a suitable magnification ratio with a reduced measurement error by adjusting angles and magnification ratio of a camera. In this case, costs and efforts may be reduced as compared to a case in which a camera is arranged for each of objects to be measured or moved for photographing each of the objects to be measured. However, in a case of periodically photographing an object with changing sizes, e.g., vegetables, a lot of effort is necessary.
Furthermore, due to properties of photographs, many errors occur according to positions of objects in a method using a single camera.
FIG. 3 is a diagram showing that length of an object is distorted while the object is being photographed, according to height of a camera.
To precisely measure size of an object by using a photograph, it is necessary for an object 310 and a camera 300 to form a right angle as shown in FIG. 3(A). If other objects 320 and 330 are arranged, a length measured by using a photograph becomes smaller than an actual length. In a case of measuring lengths only in a vertical direction, it is not necessary for an object and a camera to form a right angle, and a reference scale as shown in FIG. 2 may be used. Since both a reference scale and objects are shown to be shorter than actual heights, heights of objects may be measured by using a magnification ratio regarding the reference scale. However, in a case of measuring a horizontal length by using a vertical reference scale, the absolute value of the horizontal length cannot be measured by using a magnification ratio of the reference scale. On the contrary, a vertical length cannot be measure precisely by using a horizontal reference scale. To resolve the problems, it is necessary to use both a horizontal reference scale and a vertical reference scale.
However, a method using both a horizontal reference scale and a vertical reference scale is not only complicated, but also has a problem that it is necessary to recognize both the horizontal reference scale and the vertical reference scale. Therefore, measurement becomes complex and erroneous. The problem becomes more significant in a case of continuously measuring size of an object, such as a continuously growing plant.
Therefore, a technique for precisely measuring size of an object by using a single reference scale is highly demanded.